<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang=en><![endif]-->
<!--[if IE 7]><html class="no-js ie7 oldie" lang=en><![endif]-->
<!--[if IE 8]><html class="no-js ie8 oldie" lang=en><![endif]-->
<!--[if gt IE 8]><!-->
<html class=no-js lang=en>
<!--<![endif]-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta name='robots' content='noindex,nofollow' />
<title>Admin Login</title>
<link href="__PUBLIC__/css/style.css" rel="stylesheet" type="text/css" />
<load href="__PUBLIC__/js/jquery-1.7.1.min.js" />
<load href="__PUBLIC__/js/jquery.validate.js" />
<load href='__PUBLIC__/js/jquery.metadata.js' />
<load href='__PUBLIC__/js/jquery.form.js' />
<load href='__PUBLIC__/js/jquery-ui.js' />
<load href='__PUBLIC__/js/common.js' />
</head>
<style>
.comm{ display:none; font-size:12px; font-family:"微软雅黑";  position:relative; left:10px; font-weight:bold; }
#login_error,#regist_error,#regist_error_email{color:#F00; }
#login_success,#regist_success,#regist_success_to,.ok{ color:#090;}
.ren{color:#F00;}
</style>
<body class="special_page">
<div class="top">
  <div class="gradient"></div>
  <div class="white"></div>
  <div class="shadow"></div>
</div>
<div class="content">
  <h1> | </h1>
  <div class="background"></div>
  <div class="wrapper showf">
    <div class="box">
      <div class="header grey"><img src="__PUBLIC__/images/lock.png" width="16" height="16">
        <h3>重置密码</h3>          
<div id="login_error" class="comm">密码设置失败！</div>
<div id="login_success" class="comm">正在重设中...... <img src="__ROOT__/Public/images/loading2.gif" alt="loading..." /></div>
      </div>
<switch name="dsp">
<case value="no">
	<div class="actions ren">
		<br/>
		<p>连接过期</p>
		<br/>
	</div>
</case>
<default />
 <form action="__URL__/doChangePassword" name="login" id="login_form" method="post">
        <div class="content no-padding with-actions grey">
		<input name="user_id" type="hidden" value="{$id}">
          <div class="section _100">
            <label> 新密码： </label>
            <div>
              <input name="password" id="password" class="required" type="password" value="">
            </div>
          </div>
          <div class="section _100">
            <label> 确认密码： </label>
            <div>
              <input name="repassword" class="required" type="password">
            </div>
          </div>
        </div>
        <div class="actions">
          <div class="actions-right">
            <input value="提交" type="submit">
          </div>
        </div>
      </form>
</switch>
    </div>
    <div class="shadow"></div>
  </div>
  
<script>
    $(window).load(function() {
        var a = $("#login_form").validate({
		rules: {
			password:"required",
			repassword:{
				required: true,
				equalTo: "#password"	
			}
		},
		messages: {
			password:"请输入密码",
			repassword: {
				required: "请再次输入密码",
				equalTo: "密码不匹配"	
			}
		},			
		invalidHandler: function(d, b) {
			var e = b.numberOfInvalids();
			if (e) {
				var c = e == 1 ? "您有 1 处还没有填.": "您有 " + e + " 处还没有填.";
				$(".box .content").removeAlertBoxes();
				$(".box .content").alertBox(c, {
					type: "warning",
					icon: true,
					noMargin: false
				});
				$(".box .content .alert").css({
					width: "",
					margin: "0",
					borderLeft: "none",
					borderRight: "none",
					borderRadius: 0
				})
			} else {
				$(".box .content").removeAlertBoxes()
			}
		},
		showErrors: function(c, d) {
			this.defaultShowErrors();
			var b = this;
			$.each(d,
			function() {
				var f = $(this.element);
				var e = f.parent().find("label.error").hide();
				e.addClass("red");
				e.css("width", "");
				f.trigger("labeled");
				e.fadeIn()
			})
		},
		submitHandler:function(form){
				$('#login_form').ajaxSubmit(options);
		}
	})
		
		var options = { 
		success: showResponse,
		clearForm: true,
		timeout: 10000,
		error: function(){
				alert('Error loading XML document');
			}
		}
		function showResponse(responseText, statusText, xhr, $form)
		{ 
			if(responseText==1)
			{
				$('#login_success').show().delay(2000).slideUp();
				setTimeout('window.location="__APP__"',5000);
			}
			else
			{
				$('#login_error').show('slow').delay(3000).slideUp();
				return false;
			}
		}		
	})
	
		$('#regist_form input').keydown(function(e)
		{
			if (e.keyCode == 13) {
				$('#login_form').submit();
			}
		});		
</script>
<div id="fallr-overlay"></div>
</body>
</html>